package iterator.general;

import java.util.Vector;

/**
 * @Author：LJ
 * @Description：具体容器
 * @Date: 2017/12/1
 * @Modified By:
 */
public class ConcreteAggregate implements Aggregate {
    //容纳对象的容器
    private Vector vector = new Vector();

    @Override
    public void add(Object object) {
        vector.add(object);
    }

    @Override
    public void remove(Object object) {
        vector.remove(object);
    }

    @Override
    public Iterator iterator() {
        return new ConcreteIterator();
    }
}
